package jp.sourceforge.akjrcp.text_douga.parser;

public class TextDougaProperties implements Cloneable{
	
	private double fadein=-1;//depends on item
	private double fadeout=-1;//depends on item
	private float transparent=-1f;//depends on item
	private double duration=0;	//get value from line_duration
	private double start=-1;	//get from current time
	
	private int x=0;
	private int y=0;
	private int z=0;
	private int width=0;
	private int height=0;
	private int move_x=0;
	private int move_y=0;
	private int move_width=0;
	private int move_height=0;
	private int loop=0;	//TODO think is it better change 1?
	
	private String timing=null;
	private String text_type=PropertyUtils.TEXT_TYPE_NORMAL;//means normal
	
	private int align=-1;	//depends on item
	private int valign=-1; //depends on item
	private boolean keepAspect=true;

	private boolean noProgress=false;
	
	private double line_fps=1;
	private double line_duration=0;
	private boolean overwrap_subtitle=false;
	

	private String font_style=PropertyUtils.FONT_STYLE_PLAIN;
	private String font_name="MS Gothic";
	private int font_size=18;
	private int text_line_color=0xffffff;
	private int text_border_color=0x666666;
	private int text_select_color=0x008000;
	private int text_shadow_color=0;
	private int text_border_size=1;
	private int text_shadow_x=2;
	private int text_shadow_y=2;
	private boolean text_antialiase=true;
	private boolean text_draw_line=true;
	private boolean text_draw_border=true;
	private boolean text_draw_shadow=false;
	
	//
	private String draw_type=PropertyUtils.DRAW_TYPE_RECT;
	private int draw_color=0xff0000;//red
	
	private boolean fill;
	private int draw_size=1;
	
	private boolean draw_antialiase=true;
	
	private double shear_x;
	private double shear_y;
	private int move_rotate;
	private int rotate;
	public String getDraw_type() {
		return draw_type;
	}
	public void setDraw_type(String draw_type) {
		this.draw_type = draw_type;
	}
	public int getDraw_color() {
		return draw_color;
	}
	public void setDraw_color(int draw_color) {
		this.draw_color = draw_color;
	}

	public boolean isFill() {
		return fill;
	}
	public void setFill(boolean fill) {
		this.fill = fill;
	}
	public double getLine_fps() {
		return line_fps;
	}
	public void setLine_fps(double line_fps) {
		this.line_fps = line_fps;
	}
	public double getLine_duration() {
		return line_duration;
	}
	public void setLine_duration(double line_duration) {
		this.line_duration = line_duration;
	}
	public double getFadein() {
		return fadein;
	}
	public void setFadein(double fadein) {
		this.fadein = fadein;
	}
	public double getFadeout() {
		return fadeout;
	}
	public void setFadeout(double fadeout) {
		this.fadeout = fadeout;
	}
	
	public double getDuration() {
		return duration;
	}
	public void setDuration(double duration) {
		this.duration = duration;
	}
	public double getStart() {
		return start;
	}
	public void setStart(double start) {
		this.start = start;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	public int getMove_x() {
		return move_x;
	}
	public void setMove_x(int move_x) {
		this.move_x = move_x;
	}
	public int getMove_y() {
		return move_y;
	}
	public void setMove_y(int move_y) {
		this.move_y = move_y;
	}
	public int getMove_width() {
		return move_width;
	}
	public void setMove_width(int move_width) {
		this.move_width = move_width;
	}
	public int getMove_height() {
		return move_height;
	}
	public void setMove_height(int move_height) {
		this.move_height = move_height;
	}
	public String getTiming() {
		return timing;
	}
	public void setTiming(String timing) {
		this.timing = timing;
	}
	public String getText_type() {
		return text_type;
	}
	public void setText_type(String text_type) {
		this.text_type = text_type;
	}
	public int getAlign() {
		return align;
	}
	public void setAlign(int align) {
		this.align = align;
	}
	public int getValign() {
		return valign;
	}
	public void setValign(int valign) {
		this.valign = valign;
	}
	public boolean isKeepAspect() {
		return keepAspect;
	}
	public void setKeepAspect(boolean keepAspect) {
		this.keepAspect = keepAspect;
	}
	public boolean isOverwrap_subtitle() {
		return overwrap_subtitle;
	}
	public void setOverwrap_subtitle(boolean overwrap_subtitle) {
		this.overwrap_subtitle = overwrap_subtitle;
	}
	
	public String getFont_style() {
		return font_style;
	}
	public void setFont_style(String font_style) {
		this.font_style = font_style;
	}
	public String getFont_name() {
		return font_name;
	}
	public void setFont_name(String font_name) {
		this.font_name = font_name;
	}
	public int getFont_size() {
		return font_size;
	}
	public void setFont_size(int font_size) {
		this.font_size = font_size;
	}
	public int getText_line_color() {
		return text_line_color;
	}
	public void setText_line_color(int text_line_color) {
		this.text_line_color = text_line_color;
	}
	public int getText_border_color() {
		return text_border_color;
	}
	public void setText_border_color(int text_border_color) {
		this.text_border_color = text_border_color;
	}
	public int getText_select_color() {
		return text_select_color;
	}
	public void setText_select_color(int text_select_color) {
		this.text_select_color = text_select_color;
	}
	public int getText_shadow_color() {
		return text_shadow_color;
	}
	public void setText_shadow_color(int text_shadow_color) {
		this.text_shadow_color = text_shadow_color;
	}
	public int getText_border_size() {
		return text_border_size;
	}
	public void setText_border_size(int text_border_size) {
		this.text_border_size = text_border_size;
	}
	public int getText_shadow_x() {
		return text_shadow_x;
	}
	public void setText_shadow_x(int text_shadow_x) {
		this.text_shadow_x = text_shadow_x;
	}
	public int getText_shadow_y() {
		return text_shadow_y;
	}
	public void setText_shadow_y(int text_shadow_y) {
		this.text_shadow_y = text_shadow_y;
	}
	public boolean isText_antialiase() {
		return text_antialiase;
	}
	public void setText_antialiase(boolean text_antialiase) {
		this.text_antialiase = text_antialiase;
	}
	public boolean isText_draw_line() {
		return text_draw_line;
	}
	public void setText_draw_line(boolean text_draw_line) {
		this.text_draw_line = text_draw_line;
	}
	public boolean isText_draw_border() {
		return text_draw_border;
	}
	public void setText_draw_border(boolean text_draw_border) {
		this.text_draw_border = text_draw_border;
	}
	public boolean isText_draw_shadow() {
		return text_draw_shadow;
	}
	public void setText_draw_shadow(boolean text_draw_shadow) {
		this.text_draw_shadow = text_draw_shadow;
	}
	
	protected Object clone()
    throws CloneNotSupportedException{
		  return (super.clone());
	}
	public boolean isNoProgress() {
		return noProgress;
	}
	public void setNoProgress(boolean noProgress) {
		this.noProgress = noProgress;
	}
	public int getLoop() {
		return loop;
	}
	public void setLoop(int loop) {
		this.loop = loop;
	}
	public double parseStartTime(double currentTime) {
		if(start==-1){
			return currentTime;
		}
		return start;
	}
	public double parseDuration(double defaultDuration) {
		if(duration==0){
			return defaultDuration;
		}
		return duration;
	}
	public float getTransparent() {
		return transparent;
	}
	public void setTransparent(float transparent) {
		this.transparent = transparent;
	}
	public float parseTransparent(float default_color_transparent) {
		if(transparent==-1f){
			return default_color_transparent;
		}
		return transparent;
	}
	public double parseFadeIn(double d) {
		if(fadein==-1){
			return d;
		}
		return fadein;
	}
	
	public double parseFadeOut(double d) {
		if(fadeout==-1){
			return d;
		}
		return fadeout;
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public int getZ() {
		return z;
	}
	public void setZ(int z) {
		this.z = z;
	}
	public int parseAlign(int align2) {
		if(align==-1){
			return align2;
		}
		return align;
	}
	
	public int parseValign(int valign2) {
		if(valign==-1){//no value 
			return valign2;
		}
		return valign;
	}
	public int getDraw_size() {
		return draw_size;
	}
	public void setDraw_size(int draw_size) {
		this.draw_size = draw_size;
	}
	public boolean isDraw_antialiase() {
		return draw_antialiase;
	}
	public void setDraw_antialiase(boolean draw_antialiase) {
		this.draw_antialiase = draw_antialiase;
	}
	public double getShear_x() {
		return shear_x;
	}
	public void setShear_x(double shear_x) {
		this.shear_x = shear_x;
	}
	public double getShear_y() {
		return shear_y;
	}
	public void setShear_y(double shear_y) {
		this.shear_y = shear_y;
	}
	public int getRotate() {
		return rotate;
	}
	public void setRotate(int rotate) {
		this.rotate = rotate;
	}
	public int getMove_rotate() {
		return move_rotate;
	}
	public void setMove_rotate(int move_rotate) {
		this.move_rotate = move_rotate;
	}
	

}
